home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 13697 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.4 KB

  1. Path: condor.acc.iit.edu!usenet
  2. From: access <access@intercom.com>
  3. Newsgroups: comp.lang.c++
  4. Subject: [Q] Working through C++ - some help needed
  5. Date: Tue, 26 Mar 1996 23:27:35 -0800
  6. Organization: Illinois Institute of Technology
  7. Message-ID: <3158EDE7.2C27@intercom.com>
  8. NNTP-Posting-Host: host44.rice.iit.edu
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.0 (Win16; I)
  13.  
  14. Working my way through the "forest" of C++, I try to work on an exercise 
  15. that is more like invented, than a proven workable problem - but I 
  16. thought of being of help in understanding different concepts in C++. I am 
  17. trying to build the followings (based on classes, rather than one 
  18. single lenghty algorithm):
  19. - An array list (having the regular functions, like the ones shown 
  20. everywhere in the books: get, put, moveto, gotostart, gotoend, etc.), 
  21. which will contain a different queue in each of its elements, queues 
  22. being distinguished by a number (with pop and push functions, at least) 
  23. which queue will contain nodes (... remember the Russian dols :-) ...), 
  24. and each node will contain a couple of the most significant elements of 
  25. C++ (a char, an int, a string, for example).
  26. Now, being said the above, I don't know how to start building and how to 
  27. access the elements of each node (I don't even know if it is possible) 
  28. either by user input or from a file. What I try actually would be 
  29. something like: given an element with the int as the array element where 
  30. its queue is to be placed, how do I actually put it there using the 
  31. normal messages such constructions would come with (like: read the whole 
  32. element from a file as a string which has the data separated by blanks - 
  33. int, char and string, then taking the int and deciding what element in 
  34. the array it is going to go into, then taking the char and the string and 
  35. building the actual element and attaching it to the queue in the decided 
  36. array element). Did anybody make any sense out of this? If the answer is 
  37. YES, would any kind soul enlighten me on whether this would be possible 
  38. to build, and actually how to manipulate the messages of the different 
  39. classes I see being built (class array_list, class My_queue and class 
  40. My_queue_node) to put/remove the elements?
  41. Thanks a lot to whoever had the patience to read through this lenghty and 
  42. senseless message, and mostly to whoever would care to answer me if this 
  43. is "mission impossible".
  44.  
  45. Sleepless_C++
  46.